<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>transform 画五角星和六角星</title>
    <style>
        .star {
            width: 0;
            height: 0;
            border-bottom: 70px solid #f00;
            border-left: 100px solid transparent;
            border-right: 100px solid transparent;
            margin: 100px auto;
            transform: rotate(35deg);
            -webkit-transform: rotate(35deg);
            -moz-transform: rotate(35deg);
            -o-transform: rotate(35deg);
            -ms-transform: rotate(35deg);
            position: relative;
        }

        .star::before {
            content: '';
            width: 0;
            height: 0;
            border-bottom: 80px solid #f00;
            border-left: 30px solid transparent;
            border-right: 30px solid transparent;
            position: absolute;
            transform: rotate(-35deg);
            -webkit-transform: rotate(-35deg);
            -moz-transform: rotate(-35deg);
            -o-transform: rotate(-35deg);
            -ms-transform: rotate(-35deg);
            top: -45px;
            left: -65px;
        }

        .star::after {
            content: '';
            width: 0;
            height: 0;
            border-bottom: 70px solid #f00;
            border-left: 100px solid transparent;
            border-right: 100px solid transparent;
            position: absolute;
            transform: rotate(-70deg);
            -webkit-transform: rotate(-70deg);
            -moz-transform: rotate(-70deg);
            -o-transform: rotate(-70deg);
            -ms-transform: rotate(-70deg);
            top: 3px;
            left: -105px;
        }

        .star2 {
            width: 0;
            height: 0;
            border-bottom: 100px solid #f00;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            margin: 100px auto;
            position: relative;
        }

        .star2::after {
            content: '';
            width: 0;
            height: 0;
            border-top: 100px solid #f00;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            position: absolute;
            top: 30px;
            left: -50px;
        }
    </style>
</head>
<body>
    <div class="star"></div>
    <div class="star2"></div>
</body>
</html>